// 分页数据公共接口
export interface PageData<T = any> {
  current: number,
  pages: number,
  orders: any[],
  records: T[],
  searchCount: boolean,
  size: number,
  total: number
}

// 试卷
export interface PaperPo {
  id: number,
  subjectId: number,
  paperTypeId: number,
  paperName: number,
  time: number,
  year: number,
  createTime: string,
  updateTime: string,
  questions: QuestionPo[] | null
}

// 试题
export interface QuestionPo {
  id: number,
  type: number // 1单选 2多选
  stem: string
  analysis: string, // 解析
  answer: string, // 答案
  options: string,
  createTime: string,
  updateTime: string,
  userAnswer?: string[], // 用户答案
  viewAnalysis?: boolean  // 查看解析
}

// 考试结果
export interface PaperResultPo {
  id: number,
  createTime: string,
  paperId: number,
  useTime: number,
  userId: number,
  questions: PaperResultQuestionPo[],
  paper?: PaperPo
}

export interface PaperResultQuestionPo {
  questionId: number,
  userAnswer: string,
  status: 0 | 1 | -1
}
